#ifndef HELPER_H
#define HELPER_H

#include <iomanip>

namespace zbp
{
	template <typename T>
	void display_two_dim_array(T **D, int n, T inf)
	{
		std::cout << "       ";
		for (int k = 0; k < n; ++k)
		{
			std::cout << std::setw(5) << k;
		}
		std::cout << std::endl;
	
		for (int i = 0; i < n; ++i) 
		{
			std::cout << std::setw(3) << i << " -> ";
			for (int j = 0; j < n; ++j) 
			{
				if (D[i][j] == inf)
					std::cout << std::setw(5) << "inf";
				else
					std::cout << std::setw(5) << D[i][j];
			}

			std::cout << std::endl;
		}
	}

	template <typename T>
	void display_vector(vector<T> v, T inf)
	{
		int n = v.size();
		for (int i = 0; i < n; ++i) 
		{
			if (v[i] == inf)
				std::cout << std::setw(5) << "inf";
			else
				std::cout << std::setw(5) << v[i];
		}

		std::cout << std::endl;
	}
}

#endif